﻿using System.ComponentModel.DataAnnotations;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Syspetro.Core.DbAccessor
{
    public abstract class Entity<T> : IPrivateEntity
    {
        [Key]
        public virtual T Id { get; set; }
    }
    public abstract class EntityBase : Entity<Guid>
    {
        public EntityBase()
        {
            if (Guid.Empty == Id)
                Id = Guid.NewGuid();
        }
    }
    public abstract class EntitySoftDel<T> : Entity<T>, IEntitySoftDel<T>
    {
        public bool IsDeleted { get; set; }
    }
}
